﻿using Mofang.Utils.LogProvider;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mofang.Utils.LogTest
{
    

	public class MyLogHelper:LogHelper
    {
        public override ICommonLog BuildLog(LogModel log)
        {
            var type = (MyOperateTypes.LogType)log.Type;

            var typeName = type.ToString("g");

            var operation = OperationReader.Instance.ReadOperate(log.Operate, typeName);

            switch (type)
            {
                case MyOperateTypes.LogType.OrderLog:
                    return new OrderLog(log, operation);
                case MyOperateTypes.LogType.MasterLog:
                    return new MasterLog(log, operation);
                default:
                    return new CommonLog(log, operation);
            }
        }

    }	



}
